Imports DoAnQuanLyBanHang1065043_1065007.DoAnQuanLyBanHang.General
Imports DoAnQuanLyBanHang1065043_1065007.DoAnQuanLyBanHang.BUSS
Imports Microsoft.Reporting.WinForms
Imports DoAnQuanLyBanHang1065043_1065007.DoAnQuanLyBanHang.DAO

Public Class frmDSMatHang
    Public Sub New()
        InitializeComponent()
        DataService.OpenConnection()
    End Sub
    Private Sub frmDSMatHang_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim ketqua As IList(Of MatHangInfo) = MatHangCtrl.LayDsMatHang()

        Dim param As IList(Of ReportParameter) = New List(Of ReportParameter)()
        param.Add(New ReportParameter("Ngay", DateTime.Today.Day & "/" & DateTime.Today.Month & "/" & DateTime.Today.Year))
        Me.ReportViewerDanhSachMatHang.LocalReport.SetParameters(param)

        Me.MatHangInfoBindingSource.DataSource = ketqua

        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
        Me.ReportViewerDanhSachMatHang.RefreshReport()
    End Sub
End Class